<div class="setting">
    <?php include PROJECT_PATH . 'Application/Web/View/Setting/menu.tpl.php';?>
    <div class="right">
		<?php foreach ($feedbacks as $feedback){?>
		<div class="feedback">
			<div class="info">
    			<span><?=Web_Model_Common::getFormatTime($feedback['feedback_time'])?></span>
    			<span onclick="delFeedback(<?=$feedback['feedback_id']?>, 2)" class="btn">删除</span>
			</div>
			<div class="content html"><?=$feedback['feedback_content']?></div>
		</div>
		<?php }?>
		<?php if(empty($feedbacks)){ ?>
		<div>暂无反馈</div>
		<?php }else{?>
		<div class="page">
    		<span><a href="http://<?=HOST?>/setting/feedback/page/<?=$pageNav['firstPage']?>">[首页]</a></span>
    		<span><a href="http://<?=HOST?>/setting/feedback/page/<?=$pageNav['prePage']?>">[上一页]</a></span>
    		<?php foreach ($pageNav['pageList'] as $pageNum){ ?>
    		<span><a href="http://<?=HOST?>/setting/feedback/page/<?=$pageNum?>">[<?=$pageNum?>]</a></span>
    		<?php }?>
    		<span><a href="http://<?=HOST?>/setting/feedback/page/<?=$pageNav['nextPage']?>">[下一页]</a></span>
    		<span><a href="http://<?=HOST?>/setting/feedback/page/<?=$pageNav['lastPage']?>">[尾页]</a></span>
    	</div>
    	<?php }?>
    </div>
</div>
<script type="text/javascript">
    function delFeedback(id)
    {
    	if(!confirm("确定删除？")) return;
    	$.ajax({
    		  url: "http://<?=HOST?>/setting/delFeedbackAjax",
    		  cache: false,
    		  timeout:10000,
    		  type: "POST",
    		  data: {
    			  feedback_id:id
    		  },
    		  dataType: "json",
    		  beforeSend: function() {
    			  disableHTML(true, '请稍等，删除中……', true);
    		  },
    		  success: function(data) {
    			  if(data.errCode != 0){
    				disableHTML(true, data.errMsg, false);
      	  			setTimeout(disableHTML,2000);
    			  }else{
    				disableHTML(true, '删除成功，跳转中……', true);
    				setTimeout("location.href = 'http://<?=HOST?>/setting/feedback/page/<?=$pageNav['nowPage']?>'",2000);
    			  }
    		  },
    		  error:function(){
      			disableHTML(true, "请求出错，请重试", false);
      			setTimeout(disableHTML,2000);
      		}
    		});
    }
</script>